package com.sky.common.core.exception;

import lombok.Getter;
import lombok.Setter;

/**
 * @author Zhengcheng Z Yang
 * @description 业务异常类
 * @date 2021/12/01 14:35
 */
public class BusinessException extends RuntimeException {

	@Getter
	private String errorCode;
	@Getter
	@Setter
	private Object data;

	public BusinessException(String msg) {
		super(msg);
	}


	public BusinessException(String msg, Throwable t) {
		super(msg, t);
	}

	public BusinessException(String errorCode, String msg) {
		super(msg);
		this.errorCode = errorCode;
	}

	public BusinessException(String errorCode, String msg, Object data) {
		super(msg);
		this.errorCode = errorCode;
		this.data = data;
	}
}
